package cn.doitedu.rtdw.udfs;

import ch.hsr.geohash.GeoHash;
import org.apache.flink.table.functions.ScalarFunction;

public class GeohashUdf extends ScalarFunction {

    public String eval(Double lat,Double lng){

        String geohash = null;
        try {
            geohash = GeoHash.geoHashStringWithCharacterPrecision(lat, lng, 6);
        }catch (Exception exception){

        }

        return  geohash;
    }
}
